#ifndef WIDGET_H
#define WIDGET_H

#include <QWidget>
#include<QFile>
#include<QDomNodeList>
#include<QDomDocument>
#include<QDomProcessingInstruction>
#include<QDomNode>


QT_BEGIN_NAMESPACE
namespace Ui { class Widget; }
QT_END_NAMESPACE

class Widget : public QWidget
{
    Q_OBJECT

public:
    Widget(QWidget *parent = nullptr);
    ~Widget();



private slots:
    void on_pushButton_WriteXml_clicked();

    void on_pushButton_ReadXml_clicked();

private:
    Ui::Widget *ui;
    QFile m_qfiles;
    QString strcurrentfilepath;
    QString strcurrentfilename;

public:
    bool openxmlfiles(QString filenamepath); // 打开指定文件
    void writexmlfiles();   // 写入xml文件
    void readxmlfiles();    // 读取xml文件
    void readrootxml(QDomNodeList sonnodelist); // 读取子节点数据
};
#endif // WIDGET_H
